{% extends "homepage.html" %}

{% block content %}

<form>
<input type="hidden" name="start" value="{{info.start}}"/>
<input type="hidden" name="paging" value="0"/>
<table border="0">

          <tr>
            <td colspan="4" align="center">
            <table>
              <tr>
                <td align="center">Parity</td>
                <td align="center">Cyclic</td>
                <td align="center">Solvable</td>
                <td align="center">Primitive</td>
              </tr>
              <tr>
                <td> <select name='parity'>
 {% if info.parity=='1' %}
                   <option value='0'>All</option>
                   <option value='-1'>Odd</option>
                   <option selected='yes' value='1'>Even</option>
 {% elif info.parity=='-1' %}
                   <option value='0'>All</option>
                   <option selected='yes' value='-1'>Odd</option>
                   <option value='1'>Even</option>
 {% else %}
                   <option selected='yes' value='0'>All</option>
                   <option value='-1'>Odd</option>
                   <option value='1'>Even</option>
 {% endif %}
                  </select>
                </td>
                <td> <select name='cyc'>
 {% if info.cyc=='1' %}
                   <option value='0'>All</option>
                   <option selected='yes' value='1'>Yes</option>
                   <option value='-1'>No</option>
 {% elif info.cyc=='-1' %}
                   <option value='0'>All</option>
                   <option value='1'>Yes</option>
                   <option selected='yes' value='-1'>No</option>
 {% else %}
                   <option selected='yes' value='0'>All</option>
                   <option value='1'>Yes</option>
                   <option value='-1'>No</option>
 {% endif %}
                  </select>
                </td>
                <td> <select name='solv'>
 {% if info.solv=='1' %}
                   <option value='0'>All</option>
                   <option selected='yes' value='1'>Yes</option>
                   <option value='-1'>No</option>
 {% elif info.solv=='-1' %}
                   <option value='0'>All</option>
                   <option value='1'>Yes</option>
                   <option selected='yes' value='-1'>No</option>
 {% else %}
                   <option selected='yes' value='0'>All</option>
                   <option value='1'>Yes</option>
                   <option value='-1'>No</option>
 {% endif %}
                  </select>
                </td>
                <td> <select name='prim'>
 {% if info.prim=='1' %}
                   <option value='0'>All</option>
                   <option selected='yes' value='1'>Yes</option>
                   <option value='-1'>No</option>
 {% elif info.prim=='-1' %}
                   <option value='0'>All</option>
                   <option value='1'>Yes</option>
                   <option selected='yes' value='-1'>No</option>
 {% else %}
                   <option selected='yes' value='0'>All</option>
                   <option value='1'>Yes</option>
                   <option value='-1'>No</option>
 {% endif %}
                  </select>
                </td>
              </tr>
            </table>
          </td>
        </tr>


<tr>
<td align=left> 
{{KNOWL('gg.degree',title='Degree')}}<td align=left> <input type='text' name='n' size=3 value="{{info.n}}">:
</td>

<td align=left> 
{{KNOWL('gg.tnumber',title='$t$')}} :
<td align=left> <input type="text" name="t" size="3" value="{{info.t}}" ></td>
</tr>
<tr>
<td align='left' colspan='4'>Maximum number of groups to display <input type='text' name='count' value="{{info.count}}" size='10'>
</td>
</tr>
<tr>
<td align=left colspan="2"> 
<button type='submit' value='refine'>Search again</button>
</td></tr>
</table>
</form>

{% if info.err is defined %}

{% if info.label is defined %}
<form>
<table border=0 cellpadding=5>
<tr>
    <td>
      Search by {{KNOWL('gg.label',title="label")}}
      <input type="text" name="jump_to" value="{{info.label}}"">
      <button type="submit" value="Find">Find</button>
    </td>
    <td>
      <span class="formexample">a Galois group label, e.g. 6T3</span>
    </td>
</tr>
</table>
</form>

{% endif %}

<h2>Error</h2>
<div>
  {{ info.err|safe }}
  <p>
  Either modify your search above or go <input type=button value="Back" onClick="history.go(-1)">
</div>
{% else %}


<h2> Results: ({{info.report}}) </h2>

{% if info.number > 0 %}

<table border=1 cellpadding=5 class="ntdata">
<thead>
<tr>
<th>Label</th>
<th>Name</th>
<th>Order</th>
<th>Parity</th>
<th>Solvable</th>
</tr>
</thead>
<tbody>

{% for group in info.groups: %}
<tr>
<td><a href="/GaloisGroup/{{group.label}}">{{group.label}}</a></td>
<td>{{info.group_display([group.n, group.t])}}</td>
<td align="right">{{group.order}}</td>
<td align="right">{{group.parity}}</td>
<td align="center">{{info.yesno(group.solv)}}</td>
</tr>

{% endfor %}

</tbody>
</table>
<br>
<a href="#" class="navlink" onclick="decrease_start_by_count_and_submit_form();return false">Previous</A>
<a href="#" class="navlink" onclick="increase_start_by_count_and_submit_form();return false">Next</A></td>

{% endif %}
{% endif %}

{% endblock %}
